package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.UniversityAdmissionInformationDto;
import xyz.zhouzhaodong.crm.service.IUniversityAdmissionInformationService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 高校招生信息 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-23
 */
@RestController
@RequestMapping("/university-admission-information")
public class UniversityAdmissionInformationController {

    @Resource
    IUniversityAdmissionInformationService universityAdmissionInformationService;

    /**
     * 新增高校招生信息
     * @param universityAdmissionInformationDto
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addUniversityAdmissionInformation(UniversityAdmissionInformationDto universityAdmissionInformationDto){
        return universityAdmissionInformationService.addUniversityAdmissionInformation(universityAdmissionInformationDto);
    }

    /**
     * 删除高校招生信息
     * @param universityAdmissionInformationDto
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteUniversityAdmissionInformation(UniversityAdmissionInformationDto universityAdmissionInformationDto){
        return universityAdmissionInformationService.deleteUniversityAdmissionInformation(universityAdmissionInformationDto);
    }

    /**
     * 修改高校招生信息
     * @param universityAdmissionInformationDto
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateUniversityAdmissionInformation(UniversityAdmissionInformationDto universityAdmissionInformationDto){
        return universityAdmissionInformationService.updateUniversityAdmissionInformation(universityAdmissionInformationDto);
    }

    /**
     * 查询高校招生信息
     * @param universityAdmissionInformationDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectUniversityAdmissionInformation(UniversityAdmissionInformationDto universityAdmissionInformationDto){
        return universityAdmissionInformationService.selectUniversityAdmissionInformation(universityAdmissionInformationDto);
    }
    
}
